<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/default.css" /> 
<script src="${pageContext.request.contextPath}/js/JS_CheckForm.js" language="JavaScript"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.6.2.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath}/js/xheditor/xheditor-1.1.6-zh-cn.min.js"></script>

<script language="JavaScript">
 $(document).ready(function()  {
	 var s1=location.pathname;
     var i=s1.indexOf('/',2);	     
     var upImgUrlstr="http://"+location.host+s1.substring(0,i)+"/xheditor";
     
		 $('#elm1').xheditor({  
		 tools:'full',  
		 skin:'default',    
		 upImgUrl: upImgUrlstr,  
		 upImgExt: "jpg,jpeg,gif,bmp,png",  
		 onUpload:insertUpload  
		 });  
		 });
 
 function insertUpload(){ alert("ok");}


</script>

<title>添加产品</title>
</head>

<body bgcolor="#ffffff" onload="init()" leftmargin="0" topmargin="0">

    <s:form name="saveProduct" action="saveProduct" method="POST" theme="simple" id="frmDemo">
	
  		<table height="100%" width="100%" cellspacing="1" cellpadding="2" border="0" bgcolor="#336600">
    		<tbody>
    			<tr> 
      				<td height="26" bgcolor="#669900" colspan="2">
      					<font color="#ffffff">::添加产品</font>
      				</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">名称：</td>
      				<td height="26" width="81%"> 
      				   <s:textfield name="product.name" cssClass="bginput" size="30" maxLength="100"></s:textfield>
        				<font color="#ff0000">[必填]</font>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">产品分类：</td>
      				<td height="26" width="81%">       				  
        				 <s:select name="product.type.id" list="types" listKey="id" listValue="name" ></s:select>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">型号：</td>
      				<td height="26" width="81%"> 
      				   <s:textfield name="product.model" cssClass="bginput" size="30" maxLength="100"></s:textfield>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">材料：</td>
      				<td height="26" width="81%"> 
      				   <s:textfield name="product.material" cssClass="bginput" size="30" maxLength="100"></s:textfield>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">风速：</td>
      				<td height="26" width="81%"> 
      				   <s:textfield name="product.windSpeed" cssClass="bginput" size="30" maxLength="100"></s:textfield>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">RPM：</td>
      				<td height="26" width="81%"> 
      				   <s:textfield name="product.rpm" cssClass="bginput" size="30" maxLength="100"></s:textfield>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">功耗：</td>
      				<td height="26" width="81%"> 
      				   <s:textfield name="product.power" cssClass="bginput" size="30" maxLength="100"></s:textfield>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">温度：</td>
      				<td height="26" width="81%"> 
      				   <s:textfield name="product.airTem" cssClass="bginput" size="30" maxLength="100"></s:textfield>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">大小：</td>
      				<td height="26" width="81%"> 
      				   <s:textfield name="product.unitSize" cssClass="bginput" size="30" maxLength="100"></s:textfield>
        			</td>
    			</tr>
    			<tr bgcolor="#eeeeee"> 
      				<td height="26" width="19%" align="right">描述：</td>
      				<td height="26" width="81%"> 
      				   <s:textarea name="product.description" rows="15" cols="80"  id="elm1"> </s:textarea>     				  
        			</td>      			
    			</tr>
    			
    		<tr bgcolor="#eeeeee" align="center"> 
      			<td height="40" colspan="2">
      				<table width="100%" cellspacing="0" cellpadding="5" border="0">
          				<tbody>
          					<tr> 
            					<td height="50" align="center"> 
            					   <s:submit value="　保　存　"></s:submit>
            					   <!-- 
              						<input type="submit" value="　保　存　" class="button" name="submit">
              						 -->
              						<input type="button" onclick="history.go(-1)" value="　返  回　" class="button" name="YL">
              					</td>
          					</tr>
        				</tbody>
        			</table>
        		</td>
    		</tr>
  		</tbody>
  	</table>
</s:form>
</body>
</html>